package temps;

import java.util.Enumeration;

import javax.media.j3d.Behavior;
import javax.media.j3d.WakeupOnElapsedTime;

public class TempsVirtuel extends Behavior {
	private static final int DELAI = 1;
	public static long tempsVirtuel = 0;

	protected WakeupOnElapsedTime reveil;

	public TempsVirtuel() {
		reveil = new WakeupOnElapsedTime(DELAI);
	}

	@Override
	public void initialize() {
		wakeupOn(reveil);
	}

	@Override
	@SuppressWarnings("unchecked")
	public void processStimulus(Enumeration enu) {
		tempsVirtuel += 100;
		wakeupOn(reveil);
	}
}
